import java.io.Serializable;
import java.util.HashMap;


public class Ordre extends HashMap<String, String> implements Serializable{
	
	public Ordre(String num){
		super();
		this.put("numero", num);
	}
	
	public void ordreVitesse(String v){
		this.put("vitesse", v);
	}
	
	public void ordreDestination(String d){
		this.put("destination", d);
	}
	
	public String toString(){
		String res ="ordre au bus n :"+this.get("numero")+"\n";
		if (this.containsKey("vitesse")) res+= "vitesse :"+ this.get("vitesse")+"\n";
		if (this.containsKey("destination")) res+= "destination :"+ this.get("destination");
		return res;
	}
	
}
